//
//  GNRCommonPickCardConfig.m
//  FBSnapshotTestCase
//
//  Created by LvYuan on 2017/10/31.
//

#import "GNRCommonPickCardConfig.h"

@implementation GNRCommonPickCardConfig
@synthesize contentNibName;
@synthesize contentView;
@synthesize contentClassName;
@synthesize contentHeight;

- (UIView *)contentView{
    if (!contentView) {
        if ([self respondsToSelector:@selector(contentNibName)]) {
            NSString *nibName = [self contentNibName];
            if (nibName) {
                contentView = [[[NSBundle mainBundle]loadNibNamed:nibName owner:nil options:nil]firstObject];
            }
        }
        if (!contentView) {
            if ([self respondsToSelector:@selector(contentClassName)]) {
                NSString *clsName = [self contentClassName];
                if (clsName) {
                    contentView = [[NSClassFromString(clsName) alloc]init];
                }
            }
        }
    }
    return contentView;
}

@end
